//
//  JLDiaryAppApp.swift
//  JLDiaryApp
//
//  Created by Jiang Chencheng on 2024/9/24.
//

import SwiftUI

@main
struct JLDiaryAppApp: App {
    
    @StateObject var user = UserCenter()
    
    var body: some Scene {
        WindowGroup {
            Group {
                if user.isLogin {
                    NavigationStack {
                        StartView()
                    }
                } else {
                    NavigationStack {
                        RoomView()
                    }
                }
            }
            .environmentObject(user)
        }
    }
}
